package com.huaxin.hxmodulesystem.dto.request;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
@Schema(description = "新增操作日志请求DTO")
public class AddOperationLogReqDTO {

    @NotBlank(message = "操作人ID不能为空")
    @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "u123456789")
    private String userId;

    @NotBlank(message = "操作类型不能为空")
    @Schema(description = "操作类型（如：create_order, update_price）", requiredMode = Schema.RequiredMode.REQUIRED, example = "create_order")
    private String operationType;

    @Schema(description = "操作描述", example = "用户创建了一笔订单")
    private String description;

    @Schema(description = "操作IP地址", example = "192.168.1.100")
    private String ipAddress;

    @Schema(description = "IP地理位置", example = "中国-北京-北京")
    private String ipLocation;

    @Schema(description = "客户端信息（User-Agent）", example = "Mozilla/5.0 ...")
    private String userAgent;

    /**
     * 操作前的数据
     */
    @Schema(description = "操作前的数据")
    private String beforeData;
    /**
     * 操作后的数据
     */
    @Schema(description = "操作后的数据")
    private String afterData;
}